package com.microfch.m;

import com.microfch.ninetypetest.R;


public class Question {

    private final String content;
    private final int mTopicID;
    private int iAnswer= 0;
    private int order = 0;


    public Question(String str, int id) {
        content = str;
        mTopicID = id;
    }

    public String getContent() {
        return order+"."+content;
    }

    public int getAnswerContent() {
        switch (iAnswer){
            case -1:
                return R.string.answer;
            case 1:
                return R.string.answer_yes;
            case 0:
                return R.string.answer_no;
        }

        return R.string.answer;
    }

    public boolean getAnswer() {
        switch (iAnswer){
            case 0:
                return false;
            case 1:
                return true;
            case -1:
                return false;
        }
        return false;
    }

    public void setSwitchAnswer(boolean isChecked) {
        if(true == isChecked)
            iAnswer = 1;
        else
            iAnswer = 0;
    }

    public void setOrder(int i) {
        order = i;
    }
}
